package designpattern.observer.mq;

/**
 * 短信观察者
 * @param <E>
 */
public class MessageObserver<E> extends Observer<E> {
    @Override
    void handEvent(E event) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                sendMsg(event);
            }
        }).start();
    }

    private void sendMsg(E message){
        System.out.println("短信通知");
    }
}
